---
title: Node
description: The building blocks of everything in Eidos
sidebar:
  order: 3
---

In Eidos, nodes are the fundamental data units - equivalent to files in a traditional file system. Since Eidos stores all dynamic data in a single SQLite file, we call them "nodes" rather than files. Each node has a specific type that determines its function and purpose.

## Node Types

Eidos provides four built-in node types:

- **doc** - Document nodes for writing and storing text content
- **table** - Table nodes for managing structured data
- **folder** - Folder nodes for organizing other nodes
- **dataview** - Data view nodes for querying and displaying data

All nodes are organized in a tree structure, similar to a file system, but each node knows its type and how to handle its content.

## Data Storage

Node information is stored in the `eidos__tree` table:

```sql
CREATE TABLE IF NOT EXISTS eidos__tree (
  id TEXT PRIMARY KEY,
  name TEXT,
  type TEXT,
  parent_id TEXT NULL,
  is_pinned BOOLEAN DEFAULT 0,
  is_full_width BOOLEAN DEFAULT 0,
  is_locked BOOLEAN DEFAULT 0,
  icon TEXT NULL,
  cover TEXT NULL,
  is_deleted BOOLEAN DEFAULT 0,
  hide_properties BOOLEAN DEFAULT 0,
  position REAL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
```

### Field Definitions

| Field | Type | Description |
|-----|------|-------------|
| id | TEXT | Unique identifier for the node |
| name | TEXT | Node name |
| type | TEXT | Node type (doc/table/dataview/folder) |
| parent_id | TEXT | Parent node ID |
| icon | TEXT | Node icon |
| cover | TEXT | Node cover |
| is_pinned | BOOLEAN | Whether the node is pinned |
| is_full_width | BOOLEAN | Whether to display in full width |
| is_locked | BOOLEAN | Whether the node is locked |
| is_deleted | BOOLEAN | Whether the node is deleted |
| hide_properties | BOOLEAN | Whether to hide properties |
| position | REAL | Node position |
| created_at | TIMESTAMP | Creation timestamp |
| updated_at | TIMESTAMP | Last update timestamp |

## Extension Nodes

Eidos supports adding new node types through extensions. Extension node data is stored in the `eidos__extnodes` table:

```sql
CREATE TABLE IF NOT EXISTS eidos__extnodes (
  id TEXT PRIMARY KEY,
  blob BLOB,
  text TEXT,
  type TEXT NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
```

### Extension Node Fields

| Field | Type | Description |
|-----|------|-------------|
| id | TEXT | Unique identifier for the node |
| type | TEXT | Extension node type, e.g., `excalidraw` |
| blob | BLOB | Binary data (images, audio, video, etc.) |
| text | TEXT | Text data (JSON, Markdown, etc.) |
| created_at | TIMESTAMP | Creation timestamp |
| updated_at | TIMESTAMP | Last update timestamp |

Extension nodes choose storage fields based on data type:
- `blob` for storing binary data
- `text` for storing text data

For example, the excalidraw extension uses the `text` field to store JSON-formatted drawing data.